#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <unordered_map>
#include <QMessageBox>
#include <QLCDNumber>
#include <QPushButton>
#include <QLabel>
#include <QPlainTextEdit>
#include <vector>
#include <vector>
#include <QStatusBar>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    bool moveButtonRight(std::vector<QPushButton*>bts);
    void windowInit();
    void buttonInit();
    void displayNewQuestion();
    void seLcd(std::vector<int> &arr);
    std::string getCustomInput();
    bool judgeInput(std::string s);

private:
    Ui::MainWindow *ui;

    std::vector<std::string>ans;
    QMenuBar *bar;
    QLabel* hint = nullptr;
    QLabel* ansLabel = nullptr;
    int chooseIdx;
    QStatusBar *sbar;
    std::unordered_map<int, bool>idxVi;
    std::vector<QPushButton*>sideBtn;
    std::vector<QLCDNumber*>lcdNums;
    std::vector<std::vector<int>>nums;
    QPushButton* inputBtn;
    QPlainTextEdit* textEdit;
    QMessageBox ansMsg;

    void menuInit();

    void statusBarInit();

    void uiInit();

    void lcdInit();

    void textEditInit();
};
#endif // MAINWINDOW_H
